{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The restaurant's contact section.
  
  Created on 2008-10-14.
  $Id: resto_contact.html 269 2008-11-07 18:04:32Z heavyzheng $
-->
{% endcomment %}

<div id="resto_contact" class="section">

  {% if error %}
    <div class="error message">
      {{ error }}
      <a href="javascript:void(0);" onclick="closeMessage('#resto_contact')">[close]</a>
    </div>
  {% endif %}
  
  <div class="form-toggle">
  
    <table class="noborder">
      <tr>
        <td class="nowrap" width="1%" align="right">Web site:</td>
        <td class="nowrap">
          {% if resto.website %}
            <a href="{{ resto.website }}">{{ resto.website }}</a>
          {% else %}
            <i>N/A</i>
          {% endif %}
        </td>
      </tr>
      <tr>
        <td class="nowrap" width="1%" align="right">Email:</td>
        <td class="nowrap">
          {% if resto.email %}
            <a href="mailto:{{ resto.email }}">{{ resto.email }}</a>
          {% else %}
            <i>N/A</i>
          {% endif %}
        </td>
      </tr>
      <tr>
        <td class="nowrap" width="1%" align="right">Tel(s):</td>
        <td class="nowrap">
          {% if resto.tel_1 %}
            {{ resto.tel_1 }}
            {% if resto.tel_2 %}
              / {{ resto.tel_2 }}
            {% endif %}
          {% else %}
            <i>N/A</i>
          {% endif %}
        </td>
      </tr>
    </table>
    
    {% if editable %}
      {% if resto.is_current_user_editor or is_admin %}
        <a href="javascript:void(0);" onclick="showEditForm('#resto_contact')">[edit]</a>
      {% endif %}
    {% endif %}
  
  </div><!--/.form-toggle-->
  
  {% if editable %}
    {% if resto.is_current_user_editor or is_admin %}
    
      <form class="edit-form hidden" action="." method="POST">
        <input type="hidden" name="section" value="resto_contact"/>
        <table class="noborder">
          <tr>
            <td class="nowrap" width="1%" align="right">Web site:</td>
            <td class="nowrap">
              <input type="text" size="60" name="website" value="{{ resto.website|default:"" }}"/>
            </td>
          </tr>
          <tr>
            <td class="nowrap" width="1%" align="right">Email:</td>
            <td class="nowrap">
              <input type="text" size="60" name="email" value="{{ resto.email|default:"" }}"/>
            </td>
          </tr>
          <tr>
            <td class="nowrap" width="1%" align="right">Tel(s):</td>
            <td class="nowrap">
              <input type="text" size="25" name="tel_1" value="{{ resto.tel_1|default:"" }}"/>
              and
              <input type="text" size="25" name="tel_2" value="{{ resto.tel_2|default:"" }}"/>
            </td>
          </tr>
          <tr>
            <td></td>
            <td class="nowrap">
              <input type="button" value="Update" onclick="submitEditForm('#resto_contact');"/>
              <input type="button" value="Cancel" onclick="hideEditForm('#resto_contact');"/>
            </td>
          </tr>
        </table>
      </form><!--/.edit-form-->
      
      <div class="submitting hidden">
        <img src="/static/fnr/images/waiting.gif" alt="Submitting"/>
        Submitting your request... Please wait...
      </div><!--/.submitting-->
    
    {% endif %}
  {% endif %}

</div><!--/#resto_contact-->

